﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace UniversityExample
{
    class StudentList
    {
        public string firstName;
        public string lastName;
        DateTime dateOfBirth = new DateTime();
        public int[] marks = new int[10];
        private static int studentsNamber = 0;

        public void Credentials()
    {
            Random randomMark = new Random();
            firstName = "Vasya" + studentsNamber;
            lastName = "Pupkin";
            dateOfBirth = new DateTime(randomMark.Next(1991, 1995), randomMark.Next(1, 13), randomMark.Next(1, 25));
            //Console.WriteLine("Введите имя студента");
            //firstName = Console.ReadLine();
            //Console.WriteLine("Введите фамилию студента");
            //lastName = Console.ReadLine();
            //Console.WriteLine("Введите дату рождения");
            //dateOfBirth = DateTime.Parse(Console.ReadLine());
            Console.WriteLine("... 10 оценок введены");
        for (int i = 0; i < 10; i++)
        {
            marks[i] = randomMark.Next(0, 100);
        }
    }
    public void ShowStudentInfo()
    {
            Console.WriteLine(@"Студент - {0} {1} {2}", firstName, lastName, dateOfBirth.ToShortDateString());
    }
        public double AvareageMark()
        {
            double avareageMarkShow = 0;
            for (int i = 0; i < 10; i++)
            {
                avareageMarkShow += marks[i];
            }
            return avareageMarkShow / 10;
        }
    }
}
